Imports System.Xml.Serialization
Namespace Mapping

    Public Class EntityContainerMapping
        Inherits XEntityModelElementBase

        ''' <summary>Initializes an instance of the <see cref="EntityContainerMapping" /> class.
        ''' This is the default constructor for this class.</summary>
        Public Sub New()
            MyBase.New("EntityContainerMapping", CSXmlNamespace)
        End Sub

        ''' <summary>Initializes an instance of the <see cref="EntityContainerMapping" /> class.</summary>
        ''' <param name="other">An <see cref="System.Xml.Linq.XElement"/> object to copy from.</param>
        Public Sub New(ByVal other As XElement)
            MyBase.New(other)
        End Sub

        Private __AssociationSetMappings As AssociationSetMappingCollection
        Private __EntitySetMappings As EntitySetMappingCollection
        Private __FunctionImportMappings As FunctionImportMappingCollection

        <AutoLoad()> _
        <XmlElement("AssociationSetMapping", GetType(AssociationSetMapping))> _
        Public ReadOnly Property AssociationSetMappings() As AssociationSetMappingCollection
            Get
                If (__AssociationSetMappings Is Nothing) Then
                    __AssociationSetMappings = New EdmxEditor.Mapping.AssociationSetMappingCollection(Me, MyBase.Name.Namespace, "AssociationSetMapping")
                End If
                Return __AssociationSetMappings
            End Get
        End Property

        <AutoLoad()> _
        <XmlElement("EntitySetMapping", GetType(EntitySetMapping))> _
        Public ReadOnly Property EntitySetMappings() As EntitySetMappingCollection
            Get
                If (__EntitySetMappings Is Nothing) Then
                    __EntitySetMappings = New EdmxEditor.Mapping.EntitySetMappingCollection(Me, MyBase.Name.Namespace, "EntitySetMapping")
                End If
                Return __EntitySetMappings
            End Get
        End Property

        <AutoLoad()> _
        <XmlElement("FunctionImportMapping", GetType(FunctionImportMapping))> _
        Public ReadOnly Property FunctionImportMappings() As FunctionImportMappingCollection
            Get
                If (__FunctionImportMappings Is Nothing) Then
                    __FunctionImportMappings = New EdmxEditor.Mapping.FunctionImportMappingCollection(Me, MyBase.Name.Namespace, "FunctionImportMapping")
                End If
                Return __FunctionImportMappings
            End Get
        End Property

        <XmlAttribute(DataType:="token")> _
        Public Property CdmEntityContainer() As String
            Get
                Return Me.@CdmEntityContainer
            End Get
            Set(ByVal value As String)
                Me.@CdmEntityContainer = value
            End Set
        End Property

        <XmlAttribute()> _
        Public Property StorageEntityContainer() As String
            Get
                Return Me.@StorageEntityContainer
            End Get
            Set(ByVal value As String)
                Me.@StorageEntityContainer = value
            End Set
        End Property

    End Class

End Namespace